fix(gateway-interceptors): apply tls-native-roots for HTTPS interceptor endpoints - #2666
Merged
Merged
Conversation
sauagarwa
requested review from
a team,
derekwaynecarr,
maxamillion and
mrunalp
as code owners
August 9, 2026 22:10
sauagarwa
marked this pull request as draft
August 9, 2026 22:13
…or endpoints Endpoint::connect() does not apply TLS configuration automatically for https:// URLs even with tls-native-roots feature enabled. Add explicit .tls_config(ClientTlsConfig::new()) when the endpoint uses HTTPS so tonic uses the system's native root certificate store. Fixes NVIDIA#2665
sauagarwa
force-pushed
the
fix/interceptor-tls-native-roots
branch
from
August 9, 2026 22:45
3a40194 to
7079d1e
Compare
sauagarwa
marked this pull request as ready for review
August 9, 2026 22:59
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Collaborator
|
/ok to test 866031c |
drew
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Endpoint::connect()inconnect_endpoint()does not apply TLS configuration forhttps://interceptor endpoints. Even though the crate enablestls-native-roots,ClientTlsConfig::new()defaults towith_native_roots: false— the feature makes the method available but does not activate it automatically. This prevents gateway interceptors from being deployed as external HTTPS services.Changes
.tls_config(ClientTlsConfig::new().with_enabled_roots())when the endpoint URL starts withhttps://ClientTlsConfigfromtonic::transportwith_enabled_roots()activates all TLS root certificate sources enabled via feature flags (tls-native-roots,tls-webpki-roots)Testing
Tested with a governance interceptor deployed as a Kubernetes pod with TLS (envoy sidecar + OpenShift serving cert), exposed via an OpenShift Route (re-encrypt). Before this fix, the gateway fails with
transport error. After, it connects and initializes interceptor bindings successfully.Fixes #2665